package com.saclub.app.handler;

import com.offroader.utils.StringUtils;
import com.offroader.utils.ViewUtils;
import com.saclub.app.R;
import com.saclub.app.bean.page.AccountUserPage;
import com.saclub.app.bean.part.User;
import com.saclub.app.fragment.AccountRegFragment;

public class RegResponseHandler extends MyBaseHttpResponseHandler<AccountRegFragment, AccountUserPage> {

	@Override
	public void deal() {

		User user = page.getUser();
		if (user != null && StringUtils.isNotBlank(user.getName())) {

			ViewUtils.toast(R.string.tip_reg_success);

			caller.getActivity().finish();

		} else {
			ViewUtils.toast(R.string.tip_reg_fails);
		}

	}

}
